Skip to content

Clarify output#181

Merged
james-bruten-mo merged 21 commits intoMetOffice:mainfrom
r-sharp:clarify_output
Feb 18, 2026
Merged

Clarify output#181
james-bruten-mo merged 21 commits intoMetOffice:mainfrom
r-sharp:clarify_output

Conversation

@r-sharp
Copy link
Contributor

@r-sharp r-sharp commented Feb 6, 2026

PR Summary

Sci/Tech Reviewer: @t00sa
Code Reviewer: @james-bruten-mo

Basic steps to tidy up the output generated. Particularly by maving a "print verbosity" level more universally available throughout the code.

Code Quality Checklist

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • All automated checks in the CI pipeline have completed successfully

Testing

  • This change has been tested appropriately (please describe)

Been running it repeatedly on a modified version of Marc Stringer's UM branch to ensure the output looks reasonable at the 5 levels.

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Still using GitHub CoPilot for code completion suggestions. Each suggestion is checked to ensure it does what I was intending and at least half of them were binned.

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

(Please alert the code reviewer via a tag when you have approved the SR)

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Security considerations have been addressed
  • Performance impact is acceptable

@r-sharp r-sharp marked this pull request as ready for review February 9, 2026 12:24
@r-sharp r-sharp added this to the Spring 2026 milestone Feb 9, 2026
@r-sharp r-sharp added the blocked See Description for blocking PR label Feb 9, 2026
@github-actions github-actions bot requested a review from t00sa February 9, 2026 17:07
r-sharp and others added 9 commits February 9, 2026 18:42
MetOffice#173)

* Tweaks to get VSCode's internal linters to quit whinging and make the ToDo plugin work nicely.

* Touch O Tidying and ToDo commenting.

* reviewer request to Update script_umdp3_checker/umdp3_conformance.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Rreviwer requested changes that I was unable to commit via GitHub's web interface

---------

Co-authored-by: Pierre Siddall <43399998+Pierre-siddall@users.noreply.github.com>
Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>
MetOffice#173)

* Tweaks to get VSCode's internal linters to quit whinging and make the ToDo plugin work nicely.

* Touch O Tidying and ToDo commenting.

* reviewer request to Update script_umdp3_checker/umdp3_conformance.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Rreviwer requested changes that I was unable to commit via GitHub's web interface

---------

Co-authored-by: Pierre Siddall <43399998+Pierre-siddall@users.noreply.github.com>
Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>
MetOffice#173)

* Tweaks to get VSCode's internal linters to quit whinging and make the ToDo plugin work nicely.

* Touch O Tidying and ToDo commenting.

* reviewer request to Update script_umdp3_checker/umdp3_conformance.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Update script_umdp3_checker/umdp3_checker_rules.py

Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>

* Rreviwer requested changes that I was unable to commit via GitHub's web interface

---------

Co-authored-by: Pierre Siddall <43399998+Pierre-siddall@users.noreply.github.com>
Co-authored-by: Erica Neininger <107684099+ericaneininger@users.noreply.github.com>
Co-authored-by: Pierre Siddall <43399998+Pierre-siddall@users.noreply.github.com>
Co-authored-by: Pierre Siddall <43399998+Pierre-siddall@users.noreply.github.com>
Co-authored-by: Jenny Hickson <61183013+jennyhickson@users.noreply.github.com>
@r-sharp r-sharp removed the blocked See Description for blocking PR label Feb 17, 2026
Copy link
Contributor

@t00sa t00sa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem sensible. It might be worth investigating whether the logging module might simplify the output processing.

@r-sharp
Copy link
Contributor Author

r-sharp commented Feb 18, 2026

Changes seem sensible. It might be worth investigating whether the logging module might simplify the output processing.

It might, it was, but having done that, I'm going to express a desire to keep the weird system I've already put in place....
My reasoning is more along the lines that pretty much all the output being produced is of the form 'info' and 'debug' (and maybe 'error') and I'm not really producing logs about what the app is doing, I'm producing output with a verbosity level set for different use cases.
For example, a rose stem run, might only want a list of file names where one or more test failures were seen (-q)
A dev on the command line would get the default, which would include a further list of all the tests that failed in that file, and the line numbers those failures were detected on.
Seeing logs for 'passed' tests (including files with no failures) is thus handled by a separate flag until you hit verbosity level 4 (e.g. debug) at which point it's effectively turned on, whether you asked for it or not.
Then there's the 'full scan' use case, which doesn't have to be a full repository as it uses 'globbing' to assemble it's file lsit, not the CMS, so could be run on a file, a directory, or the whole source code, where I envisage slightly subtler control of the output might be desirable.
As the verbosity is increased, "highlighting" in the form of more spaces and two styles of horizontal line, are added to the potentially long output to allow the user to scan through the output to find the section where they want to read in detail, what went wrong.
All of this, despite my having 5 verbosity levels and there being 5 logging levels, tends to imply to me I'm using the whole concept quite differently from how logging was intended to be used.

Now my whole approach/thinking might be deeply flawed, but it's the way I like doing these things.
So the question is - should I go away and re-think it all (simplify it) such that say rose stem only sees 'errrors' a dev gets warnings but can request info and when I'm getting into it, I can turn on debug... Maybe I should, but I'm going to suggest that might be for another day / PR. 😉

@r-sharp r-sharp requested a review from t00sa February 18, 2026 12:07
Copy link
Contributor

@t00sa t00sa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sounds reasonable to me. Happy to pass this over to James for CR.

Copy link
Collaborator

@james-bruten-mo james-bruten-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that the script shouldn't be doing any extra logic within the if print_volume sections, and if you were able to modify it to do that, then it'd much neater to switch to using the logging module. I'd definitely suggest this should be on the cards for a future PR.

But it is a reasonable refactor now, so happy to get this on and keep progress on this script moving

@james-bruten-mo james-bruten-mo merged commit 58fa29e into MetOffice:main Feb 18, 2026
6 checks passed
@r-sharp r-sharp deleted the clarify_output branch February 18, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants